We were not checking the passed-in type in the right
way. An interface type can still pass the
g_type_is_a (..., G_TYPE_OBJECT) check, if G_TYPE_OBJECT
is one of its prerequisites. What we need to check is
whether the fundamental type is G_TYPE_OBJECT.
{
GParamSpec *pspec;
- if (g_type_is_a (this_type, G_TYPE_OBJECT))
+ if (g_type_fundamental (this_type) == G_TYPE_OBJECT)
{
GObjectClass *class = g_type_class_ref (this_type);
pspec = g_object_class_find_property (class, property_name);
g_type_class_unref (class);
}
- else if (g_type_is_a (this_type, G_TYPE_INTERFACE))
+ else if (g_type_fundamental (this_type) == G_TYPE_INTERFACE)
{
GTypeInterface *iface = g_type_default_interface_ref (this_type);
pspec = g_object_interface_find_property (iface, property_name);